<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function fn1(){
        console.log('fn1')
    }
    var fn2

    fn1()
    fn2()//? 报错 此时fn2仍是undefined

    fn2 = function() {
        console.log('fn2')
    }

    fn2()
</script>
</body>
</html>
